package Data::Semantic::URI::fax;

use strict;
use warnings;


our $VERSION = '0.01';


use base qw(Data::Semantic::URI);


__PACKAGE__->mk_boolean_accessors(qw(nofuture));


use constant REGEXP_KEYS => qw(URI fax);
use constant KEEP_KEYS   => qw(URI scheme phone_number);


sub flags {
    my $self = shift;
    my @flags = $self->SUPER::flags(@_);
    push @flags => 'nofuture' if $self->nofuture;
    @flags;
}


1;


__END__

{% USE p = PodGenerated %}

=head1 NAME

{% p.package %} - semantic data class for fax URIs

=head1 SYNOPSIS

    my $obj = {% p.package %}->new;
    if ($obj->is_valid($value)) { ... }

=head1 DESCRIPTION

This class can tell whether a value is a fax URI, as defined by RFC 2006. The
C<valid()> method will respect the C<nofuture> boolean attribute and the
inherited C<keep> boolean attribute.

If C<nofuture> is set, future extensions are not allowed.

If C<keep> is set, C<kept()> will return a hash with the following keys/value
pairs:

=over 4

=item URI

The complete URI.

=item scheme

The scheme.

=item phone_number

The phone number, including any possible add-ons like ISDN subaddress, a
post dial part, area specifier, service provider, etc.

=back

{% p.write_inheritance %}

=head1 METHODS

=over 4

{% p.write_methods %}

=back

=head1 SEE ALSO

L<Regexp::Common::URI::fax>

{% PROCESS standard_pod %}

=cut

